package com.gxa.saas.portal.service.impl;

import com.gxa.saas.portal.entity.vo.wylvo.GoodsVo;
import com.gxa.saas.portal.mapper.WGoodsMapper;
import com.gxa.saas.portal.service.WGoodsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Service
public class WGoodsServiceImpl implements WGoodsService {

    @Resource
    private WGoodsMapper wGoodsMapper;


    @Override
    public List<GoodsVo> goodsData(Integer id) {
        List<GoodsVo> list = wGoodsMapper.goodsData(id);
        return list;
    }

    @Override
    public BigDecimal selectAsset(Integer id) {
        BigDecimal asset = wGoodsMapper.selectAsset(id);
        return asset;
    }

    @Override
    public List<GoodsVo> changeCategory(Integer id, String category) {
        List<GoodsVo> list = wGoodsMapper.changeCategory(id, category);
        return list;
    }

    @Override
    public List<GoodsVo> selectGoods(Integer id, String goods) {
        List<GoodsVo> list = wGoodsMapper.selectGoods(id, goods);
        return list;
    }

    @Override
    public void updateState(Integer shopid, Integer id,Integer status) {
        wGoodsMapper.updateState(shopid,id,status);
    }

    @Override
    public void updateStateDown(Integer shopid, Integer id, Integer status) {
        wGoodsMapper.updateStateDown(shopid, id, status);
    }

    @Override
    public String selectPrid(Integer id) {
        String prid = wGoodsMapper.selectPrid(id);
        return prid;
    }

    @Override
    public void updateGoods( GoodsVo goods) {
       wGoodsMapper.updateGoods(goods);
    }

    @Override
    public List<String> selectCategory() {
        List<String> category = wGoodsMapper.selectCategory();
        return category;
    }

    @Override
    public void creategoods( GoodsVo goods) {
             wGoodsMapper.creategoods(goods);
    }

    @Override
    public Integer selectShopId(String sid) {
        Integer shopId = wGoodsMapper.selectShopId(sid);
        return shopId;
    }

    @Override
    public void instrtPic(String pic,Integer proid) {
    wGoodsMapper.instrtPic(pic, proid);
    }

    @Override
    public void updatePic(String pic, Integer proid) {
         wGoodsMapper.updatePic(pic, proid);
    }

    @Override
    public Integer selectByProId(String proid) {
        Integer id = wGoodsMapper.selectByProId(proid);
        return id;
    }
}
